package com.myself.mapper;

import com.myself.entity.Permission;
import com.myself.entity.Role;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * Description:
 *
 * @Author: Liuzemin
 * @Date: 2020/7/10 13:41
 */


public interface PermissionMapper {
    Permission findById(Long id);

    void create(Permission permission);

    void update(Permission permission);

    List<Permission> findAll();

    void deleteRolePermission(Long permissionId);

    void deletePermission(Long permissionId);

    void correlationRoles(@Param("permissionId") Long permissionId, @Param("roleId") Long roleId);

    List<Role> findRoleByPermissionId(Long id);

    void deleteAllPermissionsRoles(Long id);
}
